# 从dockerhub拉取基础镜像
FROM adoptopenjdk/openjdk11:jdk-11.0.8_10-alpine
# 作者信息
MAINTAINER zlg Docker edu-ad-boot "zlg@lagou.com"
# 修改源
RUN echo "http://mirrors.aliyun.com/alpine/latest-stable/main/" > /etc/apk/repositories && \
    echo "http://mirrors.aliyun.com/alpine/latest-stable/community/" >> /etc/apk/repositories
# 安装需要的软件，解决时区问题
RUN apk --update add curl bash tzdata && \
    rm -rf /var/cache/apk/*
#修改镜像为东八区时间
ENV TZ Asia/Shanghai

COPY agent/ /opt/skyagent/
COPY edu-ad-boot-impl.jar app.jar

EXPOSE 8001
CMD sleep 20
ENTRYPOINT ["java","-Xmx512m","-javaagent:/opt/skyagent/skywalking-agent.jar","-Dskywalking.agent.service_name=edu-ad-boot","-Dskywalking.collector.backend_service=192.168.91.105:11800","-jar","/app.jar"]